package com.ziyun.erp.modules.capital.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.capital.dao.MerchantApplyLogDao;
import com.ziyun.erp.modules.capital.entity.MerchantApplyLogEntity;
import com.ziyun.erp.modules.capital.service.MerchantApplyLogService;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;


@Service("merchantApplyLogService")
public class MerchantApplyLogServiceImpl extends ServiceImpl<MerchantApplyLogDao, MerchantApplyLogEntity> implements MerchantApplyLogService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<MerchantApplyLogEntity> page = this.selectPage(
                new Query<MerchantApplyLogEntity>(params).getPage(),
                new EntityWrapper<MerchantApplyLogEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    @Transactional(propagation = Propagation.REQUIRES_NEW)
    public void insertWithPRN(MerchantApplyLogEntity merchantApplyLogEntity) {
        this.insert(merchantApplyLogEntity);
    }

}
